[#47051] Twenty Nineteen theme sub-menu returns error in WAVE accessibility tool#10816
[#47051] Twenty Nineteen theme sub-menu returns error in WAVE accessibility tool#10816VladimirAus wants to merge 9 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
sabernhardt
left a comment
There was a problem hiding this comment.
The translatable strings would need translator comments to describe the menu item name.
| '<button class="menu-item-link-return" tabindex="-1" aria-label="%s">%s', | ||
| esc_attr( sprintf( __( 'Return to %s', 'twentynineteen' ), $item->title ) ), |
There was a problem hiding this comment.
| '<button class="menu-item-link-return" tabindex="-1" aria-label="%s">%s', | |
| esc_attr( sprintf( __( 'Return to %s', 'twentynineteen' ), $item->title ) ), | |
| '<button class="menu-item-link-return" tabindex="-1" aria-label="%s">%s', | |
| /* translators: %s: Parent menu item name. */ | |
| esc_attr( sprintf( __( 'Return to %s', 'twentynineteen' ), $item->title ) ), |
| '<button class="submenu-expand" tabindex="-1" aria-label="%s">%s</button>', | ||
| esc_attr( sprintf( __( 'Expand child menu for %s', 'twentynineteen' ), $item->title ) ), |
There was a problem hiding this comment.
| '<button class="submenu-expand" tabindex="-1" aria-label="%s">%s</button>', | |
| esc_attr( sprintf( __( 'Expand child menu for %s', 'twentynineteen' ), $item->title ) ), | |
| '<button class="submenu-expand" tabindex="-1" aria-label="%s">%s</button>', | |
| /* translators: %s: Parent menu item name. */ | |
| esc_attr( sprintf( __( 'Expand child menu for %s', 'twentynineteen' ), $item->title ) ), |
The goal for a core patch isn't just to satisfy WAVE, but to ensure that screen reader users (who might be navigating a complex menu) understand exactly what these buttons do.
Corrected logic for
twentynineteen_add_dropdown_icons. I have added aria-label to both the "Return" button and the "Expand" button.Ticket: https://core.trac.wordpress.org/ticket/47051